package com.jorigin.dcball.po;

/**
 *
 */
public class DoubleBall {

    private int red1;

    private int red2;

    private int red3;

    private int red4;

    private int red5;

    private int red6;

    private int blue;

    public DoubleBall() {
        this.red1 = 1;
        this.red2 = 2;
        this.red3 = 3;
        this.red4 = 4;
        this.red5 = 5;
        this.red6 = 6;
    }

    public DoubleBall(int red1, int red2, int red3, int red4, int red5, int red6, int blue) {
        this.red1 = red1;
        this.red2 = red2;
        this.red3 = red3;
        this.red4 = red4;
        this.red5 = red5;
        this.red6 = red6;
        this.blue = blue;
    }

    public int getRed1() {
        return red1;
    }

    public void setRed1(int red1) {
        this.red1 = red1;
    }

    public int getRed2() {
        return red2;
    }

    public void setRed2(int red2) {
        this.red2 = red2;
    }

    public int getRed3() {
        return red3;
    }

    public void setRed3(int red3) {
        this.red3 = red3;
    }

    public int getRed4() {
        return red4;
    }

    public void setRed4(int red4) {
        this.red4 = red4;
    }

    public int getRed5() {
        return red5;
    }

    public void setRed5(int red5) {
        this.red5 = red5;
    }

    public int getRed6() {
        return red6;
    }

    public void setRed6(int red6) {
        this.red6 = red6;
    }

    public int getBlue() {
        return blue;
    }

    public void setBlue(int blue) {
        this.blue = blue;
    }

    @Override
    public String toString() {
        return "" +  red1 +
                ", " + red2 +
                ", " + red3 +
                ", " + red4 +
                ", " + red5 +
                ", " + red6 +
                " + " + blue ;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o){ return true;}
        if (o == null || getClass() != o.getClass()) {return false;}

        DoubleBall that = (DoubleBall) o;

        if (red1 != that.red1) {return false;}
        if (red2 != that.red2) {return false;}
        if (red3 != that.red3) {return false;}
        if (red4 != that.red4) {return false;}
        if (red5 != that.red5) {return false;}
        return red6 == that.red6;
    }

    @Override
    public int hashCode() {
        int result = red1;
        result = 31 * result + red2;
        result = 31 * result + red3;
        result = 31 * result + red4;
        result = 31 * result + red5;
        result = 31 * result + red6;
        result = 31 * result + blue;
        return result;
    }
}